package del2.b;
import java.util.ArrayList;

public class Person {
	String name;
	ArrayList<Role> roles;
	
	public Person(String name){
		this.name = name;
		roles = new ArrayList<Role>();
	}
	
	public void addRole(Role a){
		roles.add(a);
	}
	
	public String getName(){
		return name;
	}
	
	public ArrayList gotRoles(){
		return roles;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append(name);
		for(Role role : roles){
			sb.append("\n\t" + role.toString());
		}
		
		return sb.toString();
	}
}
